package dockyin.action.pattern.memento;

public class Origin {

    private String data;

    public Origin(String data) {
        this.data = data;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public Memento createMemento() {
        return new Memento(data);
    }

    public void restoreMemento(Memento memento) {
        this.data = memento.getData();
    }
}
